package me.shurufa.activities;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.widget.TextView;

import butterknife.Bind;
import me.shurufa.R;
import me.shurufa.event.EventObject;
import me.shurufa.fragments.NewProfileFragment;

/**
 * 发现页点击图书跳转页面
 *
 * @FileName: me.shurufa.activities.AboutBookActivity.java
 * @author: kHRYSTAL
 * @email: 723526676@qq.com
 * @date: 2016-01-22 09:59
 */
public class ProfileActivity extends BaseActivity implements View.OnClickListener {

    @Bind(R.id.toolbar_title)
    TextView mTitleTv;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        activity_layout_res = R.layout.activity_profile;
        super.onCreate(savedInstanceState);
        initUI();
        initData();
    }

    private void initData() {
        FragmentManager fm = getSupportFragmentManager();
        FragmentTransaction ft = fm.beginTransaction();
        ft.replace(R.id.fragment_container, new NewProfileFragment());
        ft.commit();
    }

    private void initUI() {
        mTitleTv.setText(R.string.user_settings);
    }


    @Override
    public void onClick(View v) {
        Intent intent = null;
        switch (v.getId()){
        }
    }

    @Override
    public void onEventMainThread(Intent intent) {
        super.onEventMainThread(intent);
    }

    public void onEventMainThread(EventObject object){
    }
}
